﻿using System.ComponentModel.DataAnnotations;

namespace Md.Api.Model.Manage.SysMenu.Request;
/// <summary>
/// 添加系统菜单请求实体
/// </summary>
public class RequestInsertSysMenuModel : RequestBaseModel
{
    /// <summary>
    /// 菜单名称
    /// </summary>
    [Required(ErrorMessage = "菜单名称不能为空")]
    public string? MenuName { get; set; }
    /// <summary>
    /// 父菜单ID
    /// </summary>
    [Required(ErrorMessage = "父菜单ID不能为空")]
    public long ParentId { get; set; }
    /// <summary>
    /// 显示顺序
    /// </summary>
    [Required(ErrorMessage = "显示排序不能为空")]
    public int OrderNum { get; set; }
    /// <summary>
    /// 路由地址
    /// </summary>
    public string? Path { get; set; }
    /// <summary>
    /// 组件路径
    /// </summary>
    public string? Component { get; set; }
    /// <summary>
    /// 路由参数
    /// </summary>
    public string? RouteParams { get; set; }
    /// <summary>
    /// 是否为外链（0是 1否）
    /// </summary>
    [Required(ErrorMessage = "是否为外链不能为空")]
    public int IsFrame { get; set; }
    /// <summary>
    /// 是否缓存（0缓存 1不缓存）
    /// </summary>
    [Required(ErrorMessage = "是否缓存不能为空")]
    public int IsCache { get; set; }
    /// <summary>
    /// 菜单类型（M目录 C菜单 F按钮）
    /// </summary>
    [Required(ErrorMessage = "菜单类型不能为空"), StringLength(1, ErrorMessage = "菜单类型长度为1")]
    public string? MenuType { get; set; }
    /// <summary>
    /// 菜单状态（0显示 1隐藏）
    /// </summary>
    [Required(ErrorMessage = "菜单显示不能为空"), StringLength(1, ErrorMessage = "菜单显示长度为1")]
    public string? Visible { get; set; }
    /// <summary>
    /// 菜单状态（0正常 1停用）
    /// </summary>
    [Required(ErrorMessage = "菜单状态不能为空"), StringLength(1, ErrorMessage = "菜单状态长度为1")]
    public string? Status { get; set; }
    /// <summary>
    /// 权限标识
    /// </summary>
    public string? Perms { get; set; }
    /// <summary>
    /// 菜单图标
    /// </summary>
    public string? Icon { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }
}

